#include "Stone.h"
#include "ResourceManager.h"
#include <d3dx9.h>

Stone::Stone(int id,float x, float y, int type)
{
	if(type == 2)
	{
		_sprite = new Sprite(_spriteHandler, ResourceManager::GetInstance()->GetTexture(ResourceManager::GetInstance()->TextureName.Stone),0, 0);
	}
	if(type == 56)
	{
		_sprite = new Sprite(_spriteHandler, ResourceManager::GetInstance()->GetTexture(ResourceManager::GetInstance()->TextureName.Stone_2),0, 0);
	}
	_id = id;
	_x = x;
	_y = y;
	_type = type;
	_width = _sprite->getTexture()->getWidth();
	_height = _sprite->getTexture()->getHeight();

	_vx = 0;
	_vy = 0;
}

Stone::~Stone(void)
{
	if (_sprite)
	{
		delete _sprite;
	}
	
}

void Stone::Update(list<Object *> *_list,float time)
{

}

OBJECT_TYPE Stone::getObjectType()
{
	return OBJECT_LAND;
}


void Stone:: Render(int vpX, int vpY)
{
	_sprite->Render(_x, _y, vpX, vpY);
}

